<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link type="text/css" rel="stylesheet" href="css/login.css"/>
    <script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="js/login.js"></script>
    <title>简历</title>
</head>

<body>
<div class="header">
    <div class="mainwarp">
        <div class="logo"><a href="index.jsp"><img src="images/log.png"/></a></div>
        <div class="welcome">欢迎注册</div>
        <div class="headerright">
            <a href="login.jsp">个人登录</a>
            <span>|</span>
            <a href="index.jsp">返回首页</a>
        </div>
    </div>
</div>
<div class="jianliBox">
    <div class="jlpart1">
        <img src="images/img1.png"/>
    </div>
    <div class="jlpart2">
        <div class="jlpart2_1">
            <div class="jlbox1">
                <h1>一分钟填写简历</h1>
                <p>填写以下信息即可生成一份简历，一步注册，起航你的成功之梦！</p>
            </div>
            <div class="jlbox2">
                <span class="tit">姓名</span>
                <input id="rUname" name="" type="text" class="txtcon txt1"/>
            </div>
            <div class="jlbox2">
                <span class="tit">我是</span>
                <div id="rusexman" class="sex on">男</div>
                <div id="rusexwomen" class="sex">女</div>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span class="tit">出生于</span>
                <input id="rUbirthplace" name="" type="text" class="txtcon txt3"/>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span class="tit">手机号</span>
                <input id="rUphone" name="" type="text" class="txtcon txt3"/>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span class="tit">毕业学校</span>
                <input id="rUschoolname" name="" type="text" class="txtcon txt3"/>
                <select id="rUeducationalbackground" class="txtcon txt5">
                    <option value="A">初中及一下</option>
                    <option value="B">中专/中技</option>
                    <option value="C">高中</option>
                    <option value="D">大专</option>
                    <option value="E">硕士</option>
                    <option value="F">本科</option>
                    <option value="G">博士</option>
                </select>
                <div class="titxt">学历</div>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span class="tit">专业名称</span>
                <input id="rUmajorname" name="" type="text" class="txtcon txt3"/>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span id="rUstudymajor" class="tit">所学专业</span>
                <input name="" type="text" class="txtcon txt3"/>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span class="tit">想在</span>
                <select id="rProvince" class="txtcon txt5">
                    <option>请选择省份</option>
                </select>
                <select id="rCity" class="txtcon txt5">
                    <option>请选择省份</option>
                </select>
                <div class="titxt">找月薪</div>
                <select id="rUexpectedsalary" class="txtcon txt6">
                    <option value="0">30000以上</option>
                    <option value="1">20000-30000</option>
                    <option value="2">10000-20000</option>
                    <option value="3">5000-10000</option>
                    <option value="4">5000以下</option>
                </select>
                <div class="titxt">的</div>
                <select id="rUworknature" class="txtcon txt5">
                    <option value="0">全职</option>
                    <option value="1">兼职</option>
                    <option value="2">实习</option>
                </select>
                <div class="titxt">工作</div>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <span class="tit">求职状态</span>
                <select id="rUjobstatus" class="txtcon txt2">
                    <option value="0">离职-随时到岗</option>
                    <option value="1">在职-月内到岗</option>
                    <option value="2">在职-考虑机会</option>
                    <option value="3">在职-暂不考虑</option>
                </select>
            </div>
            <div class="jlbox2">
                <span class="tit">邮箱</span>
                <input id="rEmail" name="" type="text" class="txtcon txt3"/>
                <div class="clear"></div>
            </div>
            <div class="jlbox2">
                <input id="generaterResume" name="" type="button" value="生成简历" class="jlbtn"/>
            </div>
        </div>
    </div>
</div>

<div class="clear"></div>
<div class="footer">
</div>
</body>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $.get("getprovinces.do", function (province) {
            eval("var provinceList=" + province);
            for (var i = 0; i < provinceList.length; i++) {
                var obj = "<option value='" + provinceList[i].pid + "'>" + provinceList[i].pname + "</option>"
                $(obj).appendTo($("[id='rProvince']"));
            }
        })

        $("[id='rProvince']").click(function () {
            var pid = $(this).val()
            $("[id='rCity']").empty();
            $.get("getCitys.do", "pid=" + pid, function (citys) {
                eval("var citysList=" + citys);
                for (var i = 0; i < citysList.length; i++) {
                    var obj = "<option value='" + citysList[i].name + "'>" + citysList[i].name + "</option>"
                    $(obj).appendTo($("[id='rCity']"));
                }
            })
        })

        var rUsex = "男";
        $("[id='rusexman']").click(function () {
            rUsex = $(this).text();
        })
        $("[id='rusexwomen']").click(function () {
            rUsex = $(this).text();
        })
        $("[id='generaterResume']").click(function () {

            var rUid = "${user.uid}"
            var rUname = $("[id='rUname']").val()
            var rUbirthplace = $("[id='rUbirthplace']").val()
            var rUphone = $("[id='rUphone']").val()
            var rUschoolname = $("[id='rUschoolname']").val()
            var rUeducationalbackground = $("[id='rUeducationalbackground']").val()
            var rUmajorname = $("[id='rUmajorname']").val()
            var rUstudymajor = $("[id='rUstudymajor']").val()
            var rProvince = $("[id='rProvince']").val()
            var rCity = $("[id='rCity']").val()
            var rUexpectedsalary = $("[id='rUexpectedsalary']").val()
            var rUworknature = $("[id='rUworknature']").val()
            var rUjobstatus = $("[id='rUjobstatus']").val()
            var rEmail = $("[id='rEmail']").val()

            $.get("insertResume.do",
                {
                    "rUid": "${user.uid}",
                    "rUname": rUname,
                    "rUsex": rUsex,
                    "rUbirthplace": rUbirthplace,
                    "rUphone": rUphone,
                    "rUschoolname": rUschoolname,
                    "rUeducationalbackground": rUeducationalbackground,
                    "rUmajorname": rUmajorname,
                    "rUstudymajor": rUstudymajor,
                    "rProvince": rProvince,
                    "rCity": rCity,
                    "rUexpectedsalary": rUexpectedsalary,
                    "rUworknature": rUworknature,
                    "rUjobstatus": rUjobstatus,
                    "rEmail": rEmail
                }, function (i) {
                    if (window.confirm("快速简历填写成功，是否去到主页面")) {
                        window.location.replace("index.jsp")
                    }
                }
            )
        })


    })
</script>
</html>
